@extends('admin::layouts.master')
@section('title')
    商品订单
@endsection
@section('tab')

    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body ">
                        <form class="layui-form layui-col-space5">
                            <div class="layui-input-inline layui-show-xs-block" style="width: 300px; ">
                                <input type="text" name="order_no" placeholder="订单号" value="{{$arr_search['order_no']}}" autocomplete="off" class="layui-input"></div>

                            <div class="layui-input-inline layui-show-xs-block">
                                <select name="pay_status">
                                    <option value="">是否支付</option>
                                    <option value="0" @if($arr_search['pay_status']==0 && $arr_search['pay_status'] != null ) selected @endif>未支付</option>
                                    <option value="1" @if($arr_search['pay_status']==1) selected @endif>已支付</option>
                                </select>
                            </div>

                            <div class="layui-input-inline layui-show-xs-block">
                                <button class="layui-btn" lay-submit="" lay-filter="sreach">
                                    <i class="layui-icon">&#xe615;</i></button>
                                <a class="layui-btn layui-btn-small" onclick="location.reload()" title="刷新">
                                    <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
                                </a>
                            </div>
                        </form>
                    </div>
                    <div class="layui-card-body layui_overflow_y ">
                        <table class="layui-table layui-form">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>商品图片</th>
                                <th>订单号</th>
                                <th>商品名称</th>
                                <th>商品规格</th>
                                <th>购买时间</th>
                                <th>购买用户</th>
                                <th>购买数量</th>
                                <th>单价</th>
                                <th>总积分</th>
                                <th>支付状态</th>
                                <th>订单状态</th>
                                <th>收货地址</th>
                                <th>操作</th></tr>
                            </thead>
                            <tbody>
                            @foreach($data as $key=>$value)
                            <tr>
                                <td>{{ $value['id'] }}</td>
                                <td><img src="{{$value['get_goods_info']['pic_url']['full_src']}}"></td>
                                <td>{{$value['order_no']}}</td>
                                <td>{{$value['get_goods_info']['name']}}</td>
                                <td>{{$value['specs']}}</td>
                                <td>{{ $value['created_at'] }}</td>
                                <td>{{ $value['get_user_info']['nickname']}}</td>
                                <td>{{$value['get_order_mall_detail']['goods_num']}}</td>
                                <td>{{$value['get_order_mall_detail']['goods_integral']}}</td>
                                <td>{{$value['get_order_mall_detail']['integral_sum']}}</td>
                                <td>{{ $value['pay_status_msg'] }}</td>
                                <td>{{ $value['status_msg'] }}</td>
                                <td>
                                    @if( empty( $value['get_address_info'] ) )
                                        -
                                    @else
                                        {{ $value['get_address_info']['province'] }}-{{ $value['get_address_info']['city'] }}-{{ $value['get_address_info']['area'] }}-{{ $value['get_address_info']['address'] }}
                                    @endif
                                </td>
                                <td>
                                 <!--    @if( $value['pay_status'] == 1 && $value['status'] == 0  )
                                    <a title="发货" data-href="{{route('admin_order_send',['id'=>$value['id']])}}" data-title="确定要发货吗？请谨慎操作" href="javascript:;" class="btn btn-warning ajax_member_change_status">发货</a>
                                    @endif
                                    @if( $value['pay_status'] == 1 && $value['status'] == 2 )
                                    <a title="退款" data-href="{{route('admin_order_send_back',['id'=>$value['id']])}}" data-title="确定要退款吗？请谨慎操作" href="javascript:;" class="btn btn-warning ajax_member_change_status">退款</a>
                                    @endif

                                    <a title="查看详情" onclick="xadmin.open('查看详情','{{route("admin_order_details",["id"=>$value["id"]])}}')" href="javascript:;">查看详情</a> -->
                                </td>
                            </tr>
                            @endforeach
                            @if(empty($data))
                                <td colspan="66" align="center">暂无数据</td>
                            @endif
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-card-body ">
                        <div class="page">
                            {{$page_link}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

@endsection

@section('tab_js')
@endsection




